﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using NUnit.Framework;
using OpenPowerPoint.Slides;

namespace OpenPowerPointTest.Operations
{
    [TestFixture]
    [Category("Unit: Themes")]
    public class Themes
    {
        Theme _theme;

        #region Setup/Teardown
        [SetUp]
        public void Setup()
        {
            _theme = OpenPowerPoint.Slides.Themes.Larissa;
        }
        #endregion

        [Datapoints]
        Color[] colors = { Colors.AliceBlue, Colors.Aqua, Colors.BlanchedAlmond, Colors.DarkBlue, Colors.DarkRed, Colors.DimGray, Colors.Goldenrod,
                             Colors.LawnGreen, Colors.LightSlateGray, Colors.MediumSlateBlue, Colors.OldLace, Colors.PapayaWhip, Colors.SaddleBrown, 
                             Colors.Snow, Colors.Transparent };

        [Theory]
        public void UpdateColor(Color old, Color updated)
        {
            _theme.Accent1 = old;
            Color check = _theme.Accent1;

            _theme.Accent1 = updated;
            check = _theme.UpdateColor(check);

            //Because we store additional data, two colors will not be equal unless made from the same source!
            Assume.That(check.R == updated.R && check.G == updated.G && check.B == updated.B && check.A == updated.A, "Color was not updated");
        }
    }
}
